package com.lepu.app.fun.knowledge.bean;

import java.util.ArrayList;

import org.json.JSONException;
import org.json.JSONObject;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

public class Knowledge {
	
	public String RefreshTime;
    public ArrayList<Article> Banner;  //轮播图
	public ArrayList<Article> YZZNListInfo; //月子
	public ArrayList<Article> YQListInfo; //孕期
	public ArrayList<Article> YEListInfo; //育儿
	
	public static Knowledge parseJsonData(String dataString)
	{
		String result = "";
		try {
			JSONObject jsonObject = new JSONObject(dataString);
			JSONObject obj1 = (JSONObject) jsonObject.get("Result");
			JSONObject obj2 = (JSONObject) obj1.get("DetailInfo");
			
			result = obj2.toString();
		} catch (JSONException e) {
			e.printStackTrace();
		}
		
		Gson gson = new Gson();
		Knowledge knowledge = gson.fromJson(result,new TypeToken<Knowledge>() {}.getType());
		return knowledge;
	}
	
}
